﻿// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-13 22:14:57
// 负责人：Sushee
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq.Expressions;
using OF.Component.DTO;
using OF.Utility;
using OF.Component.Model;
using OF.Component.IDAL;
using OF.Component.Factory;
namespace OF.Component.BLL
{
	
	/// <summary>
	///收件地址 扩展
	/// </summary>
	public partial class MailAddressOperate
	{
        /// <summary>
    	/// 根据断言条件获取单个收件地址
    	/// </summary>
        public static MailAddressInfo QuerySingle(Expression<Func<MailAddressInfo, bool>> predicate)
        {
            return dal.QuerySingle(predicate);
        }
        
        /// <summary>
    	/// 根据断言条件获获取收件地址列表
    	/// </summary>
        public static IList<MailAddressInfo> QueryList(Expression<Func<MailAddressInfo, bool>> predicate)
        {
            return dal.QueryList(predicate);
        }

        /// <summary>
        /// 获取默认收件地址
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public static MailAddressInfo GetDefault(long userId)
        {
            return dal.GetDefault(userId);
        }

        public static IList<MailAddressDto> SearchList(MailAddressConditon condition, out int total)
	    {
	        return dal.SearchList(condition, out total);
	    }

    }
}